If ( [IntPtr]::Size * 8 -ne 64 )
{
    C:\Windows\SysNative\WindowsPowerShell\v1.0\PowerShell.exe -File $MyInvocation.MyCommand.Path
}
Else
{
    if ( Test-Path -Path "HKLM:\SOFTWARE\Google\Chrome\Enrollment" ) {

	Remove-Item -Path "HKLM:\SOFTWARE\Google\Chrome\Enrollment" -Recurse
    }

    if ( Test-Path -Path "HKLM:\Software\WOW6432Node\Google\Enrollment" ) {

	Remove-Item -Path "HKLM:\Software\WOW6432Node\Google\Enrollment" -Recurse
    }

    if ( -Not ( Test-Path -Path "HKLM:\SOFTWARE\Policies\Google\Chrome\" )) {

	New-Item -Path "HKLM:\SOFTWARE\Policies\Google\" -Name "Chrome" -Force
    }

    New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Google\Chrome\' -Name "CloudManagementEnrollmentToken" -Value "$Env:chrome_token"
    New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Google\Chrome\' -Name "CloudManagementEnrollmentMandatory" -Value True
}